<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>留言板</title>
	<script>
	  async function postData(url = "", data = {}){
		  const response = await fetch(url, {
			  method: "POST",
			  headers:{
				  "Content-Type": "application/json",
			  },
			  body: JSON.stringify(data),
		  });
		  return response.json();
	  }
	  function loadFirstPage(){
		  postData("./msg", {size:10, page:1})
	  }
	</script>
</head>
<body onload="loadFirstPage()">
<h1 align="center">欢迎留言</h1>
<div class='main' align="center">
	<div class='msgeditor'>
	  <textarea class='content' cols='50' rows='5'></textarea>
	  <br/>
    <input class='publish' type='submit' value="提交"/>
	</div>
	<div class='msglist'></div>
</div>
</body>
</html>